package main

import (
	"controller"
	"net/http"
	"strings"
	"test"
)

// Default Request Handler
func defaultHandler(w http.ResponseWriter, r *http.Request) {
	urlPath := r.URL.Path
	if strings.Contains(urlPath, "/www/") {
		controller.DomainInfor(w, r)
	} else if strings.Contains(urlPath, "/test/") {
		test.Test(w, r)
	}
}

func init() {
	http.HandleFunc("/", defaultHandler)
	http.ListenAndServe(":80", nil)
}
